 <{extends file="<{$tempdir}>/public/wxsite.html"}>  
<{block name=extendcss}> 
<link rel="stylesheet"  href="<{$siteurl}>/templates/<{$tempdir}>/public/wxsite/css/shopshow.css">   
<{/block}>
 <{block name=extendjs}>  
  <script src="<{$siteurl}>/templates/<{$tempdir}>/public/wxsite/js/wxshop.js"></script>  
<{/block}>
<{block name=sitetitle}><{$sitename}><{/block}>
<{block name=hearnav}><{/block}>
<{block name=footer}><{/block}>
<{block name=myScrolljs}><script> 
		var myScroll;
function loaded() {
	myScroll = new iScroll('wrapper11', {
		useTransform: false,
		onBeforeScrollStart: function (e) {
			var target = e.target;
			while (target.nodeType != 1) target = target.parentNode;

			if (target.tagName != 'SELECT' && target.tagName != 'INPUT' && target.tagName != 'TEXTAREA')
				e.preventDefault();
		}
	});
}
document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false); 
document.addEventListener('DOMContentLoaded', function () { setTimeout(loaded, 200); }, false);
</script>
<{/block}>
<{block name=blockcontent}> 
<div id="wrapper11" style="top:0px;bottom:0px;">

<div style="width:100%; height:150px;text-align:center; background:#fe5052;">
	<a href="<{$siteurl}>"><img src="<{$html5logo}>" style="width:134px; margin-top:50px; height:42px;" /></a>
</div>
<style>
.wxbanguser{width:80%;padding-left:52px;  border:1px solid #d6d2cf; background:url(<{$siteurl}>/templates/<{$tempdir}>/public/wxsite/images/wxbangdBg.png) left center #ffffff no-repeat; background-size:46px 42px; height:42px;}
.wxbangpsw{margin-top:15px;width:80%; padding-left:52px;  border:1px solid #d6d2cf; background:url(<{$siteurl}>/templates/<{$tempdir}>/public/wxsite/images/wxbangdBg.png) left center #ffffff no-repeat; background-size:46px 42px; height:42px;}
</style>
<div style="width:100%; position:absolute; font-size:16px; color:#6b696a; top: 170px;">

<form id="wxbangduserfrom" action="<{ofunc type=url link="/wxsite/wxbangduser/datatype/json"}>" >	
	<div style="width:90%;margin:0 auto; ">
		<h1 style="margin-bottom:15px;">绑定您已注册过的一个账号和密码</h1>
		<div style="width:100%;height:42px;">
		<input type="text" class="wxbanguser" placeholder="昵称" name="wxbanguser" id="wxbanguser" value="" />
		</div>
		<input type="password" class="wxbangpsw" placeholder="密码"  name="wxbangpsw" id="wxbangpsw" value="" />
		
		
		<h1 id="wxbangduser"   onclick="wxbangduser();"  style="margin-top:15px; background:#ff6600;  border-radius:5px; color:#fff; padding:10px 0px; text-align:center; cursor:pointer;">绑定微信帐号</h1>
	</div>
</form>
</div>




<script>
function  wxbangduser(){
	// $("#wxbangduser").click(function(){
		
	
		 $('#loading').show();
		 
		url = siteurl+'/index.php?ctrl=wxsite&action=wxbangduser&datatype=json&random=@random@';
     	  url = url.replace('@random@', 1+Math.round(Math.random()*1000));
        $.ajax({         //script定义
                 url: url.replace('@random@', 1+Math.round(Math.random()*1000)),
                 dataType: "json",
                 async:true,
                 data:{'wxbanguser':$("#wxbanguser").val(),'wxbangpsw':$("#wxbangpsw").val()},
                 success:function(content) { 
                 	if(content.error ==  false){
					
					//	alert(0);
						//window.location.href= 'http://www.baidu.com';
						
							Tmsg('绑定成功');
							$('.closegb').live("click", function() {   
								 $('.popup').slideToggle('slow',function(){$('#mask').remove();$('.popup').remove();}); 
								 window.location.href=  siteurl+'/index.php?ctrl=wxsite&action=member' ;
								 
							});
							
						
							
                 	}else{
                 		Tmsg(content.msg);
                 	}
                  	$('#loading').toggle();
                 
                 },
                 error:function(){
                  $('#loading').toggle();
                 }
        }); 
		
		
		
	//});
	
}
</script>
  
  </div>
  
	
 
<{/block}>